import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.LinkedList;
import java.util.List;

public class write {
    public static void main(String[] args) {
        BufferedWriter bf;
        try (FileWriter fw = new FileWriter("C:\\Users\\22453\\Desktop\\test.txt")) {
            bf = new BufferedWriter(fw);
            bf.write("csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa20" +
                    "21csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2" +
                    "021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021csa2021");
            bf.close();
            System.out.println("写入成功");
        } catch (IOException e) {
            System.out.println("文件读写错误");
            e.printStackTrace();
        }


    }
}
